package designPatterns;

import designPatterns.service.impl.PayService;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class PayServiceCapacityFactory {

    public static Map<Integer, PayService> CONTAINER = new ConcurrentHashMap();


    public static void register(Integer type, PayService payService) {
        CONTAINER.put(type, payService);
    }


    public static PayService getPayService(Integer type) {
        return CONTAINER.get(type);
    }

}
